package com.example.crt_dispatching_center.controller;

import com.example.crt_dispatching_center.entity.ElectricityCost;
import com.example.crt_dispatching_center.service.CostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/cost")
public class CostController {
    @Autowired
    private CostService CostService;

    @GetMapping("/past7days")
    public Map<String, List<?>> getFare(){
        return CostService.getCost();
    }
}
